home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 21.zip
/
BS1 part 21
/
Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].7z
/
Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].adf
/
rexx.lzh
/
Calculator.pprx
< prev
next >
Wrap
Text File
|
1992-03-13
|
946b
|
44 lines
/*
@BCalculator @P@ICopyright Gold Disk Inc., February, 1992
This Genie allows you to evaluate one-line mathematical expressions.
*/
if ~show(l, "gdarexxsupport.library") then
if ~addlib("gdarexxsupport.library", 0, -30) then
exit_msg("Please install the gdarexxsupport.library in your Libs: directory before running this Genie!")
signal on error
signal on syntax
call ppm_AutoUpdate(0)
defvalue = getclip(ppm_calval)
cr = pos('0a'x,defvalue)
if cr ~= 0 then defvalue = left(defvalue,cr-1)
command = ppm_GetForm("Enter Calculation",40, "Expression =:"defvalue)
if command = '' then exit_msg()
interpret "returnval = "command
call setclip(ppm_calval, returnval)
call exit_msg(command" = "returnval)
error:
syntax:
do
if rc = 16 then exit_msg()
exit_msg(command ": "errortext(rc))
end
exit_msg:
do
parse arg message
if message ~= '' then call ppm_Inform(1, message,)
call ppm_AutoUpdate(1)
exit
end